﻿namespace SpiceNet.Integration
{
    public class IntegrationConfiguration
    {
        /// <summary>
        /// The minimum spacing between breaks
        /// </summary>
        // public double MinBreak { get; set; } = 0.0;

        /// <summary>
        /// The minimum spacing between time points
        /// </summary>
        public double DelMin = 0.0;

        /// <summary>
        /// Relative tolerance for the local truncation error
        /// </summary>
        public double LteRelTol = 1e-3;

        /// <summary>
        /// Absolute tolerance for the local truncation error
        /// </summary>
        public double LteAbsTol = 1e-6;

        /// <summary>
        /// The truncation tolerance
        /// </summary>
        public double TrTol = 7;

        /// <summary>
        /// Constructor
        /// </summary>
        public IntegrationConfiguration() { }

        /// <summary>
        /// Copy to another configuration
        /// </summary>
        /// <param name="c"></param>
        public void CopyTo(IntegrationConfiguration c)
        {
            c.DelMin = DelMin;
            c.LteRelTol = LteRelTol;
            c.LteAbsTol = LteAbsTol;
            c.TrTol = TrTol;
        }
    }
}
